package com.wt.service.service.demo.impl;

import com.wt.dao.demo.mapper.UserMapper;
import com.wt.dao.demo.model.User;
import com.wt.service.service.demo.DemoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.Map;

@Service("demoService")
public class DemoServiceImpl implements DemoService
{

    @Autowired
    private UserMapper userMapper;

    public Map<String,Object> demo(String id)
    {
        User user =userMapper.selectByPrimaryKey(Integer.valueOf(id));
        Map<String,Object> resultMap = new HashMap<String,Object>();
        resultMap.put("user",user);
        return resultMap;
    }
}
